package com.ochnas.volunteersignup.service;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.SortedMap;

import org.springframework.transaction.annotation.Transactional;

import com.ochnas.volunteersignup.domain.Event;
import com.ochnas.volunteersignup.domain.FilledVolunteerRequisition;
import com.ochnas.volunteersignup.domain.Position;
import com.ochnas.volunteersignup.domain.TimeSlot;
import com.ochnas.volunteersignup.domain.User;

public interface VolunteerService {
	
	List<Event> findAllFutureEvents(Date startDate);
	List<Position> findAllPositionsByEvent(Long eventId);
	List<Position> findAllFilledPositionsByEvent(Long eventId);
	List<TimeSlot> findAllFilledTimeSlotsByEvent(Long eventId);
	List<Position> findAllOpenPositionsByEvent(Long eventId);
	List<TimeSlot> findAllOpenTimeSlotsByEvent(Long eventId);
	List<TimeSlot> findAllOpenTimeSlotsByPosition(Long positionId);
	String findDetailedVolunteerInfoByEvent(Long eventId);
	@Transactional
	FilledVolunteerRequisition registerForEventByTimeSlot(TimeSlot ts, User user);
	@Transactional
	FilledVolunteerRequisition registerForEventByPosition(Position p, User user);
	@Transactional
	void unregisterForEventByTimeSlot(TimeSlot ts, User user);
	@Transactional
	void unregisterForEventByPosition(Position p, User user);
	SortedMap<Long, List<FilledVolunteerRequisition>> findVolunteersForPositionsWithoutTimeSlotsByEvent(Long eventId);	
	SortedMap<Long, List<FilledVolunteerRequisition>> findVolunteersForTimeSlotsByEvent(Long eventId);
	Map<Long, List<TimeSlot>> findMapOfOpentTimeSlotsForPositionByEvent(Long eventId);
	List<TimeSlot> findTimeSlotsByPosition(Long positionId);
}
